\section{RS232 serial interface and Windows control program.}

This new version of the altimeter includes the possibility of connecting a PC
through a RS232 serial interface.

Several routines necessary for the communication were added to the firmware,
but some circuitry was necessary to transform the 0 to 5 V signals to the
RS232 standard (-15 to +15V). According to this standard, a logical 1 is
represented with a voltage between -5 and -15V, while a logical 0 is
represented using a voltage between +5 and +15V.

The circuitry required was designed around the MAX232 chip. This chip includes
doublers and inverters to acomplish the required voltages. This circuit is
used as a bridge between the altimeter and the PC.

Along with the new firmware version, the required communication software that
runs under Windows is provided. This software allows the user to connect to
the altimeter and change the flight parameters of the rocket.

The communication follows the MASTER-SLAVE model, in which the altimeter acts as
slave of the PC. The exchange of information between these two units is done
according to the protocol describe in the appendices.

\subsection{Bill of materials for the RS232 serial interface.}

\begin{center}
\begin{tabular}{|c|c|c|c|c|} \hline 

\textbf{Part}    & \textbf{Value}         & \textbf{Name} & \textbf{Presentation}  & \textbf{Comments} \\ \hline \hline
IC1      &                  & MAX232        &  DIL16         &  \\ \hline
C1       & 1\,$\mu$F        & Capacitor     &                & Electrolytic \\ \hline 
C2       & 1\,$\mu$F        & Capacitor     &                & Electrolytic \\ \hline
C3       & 1\,$\mu$F        & Capacitor     &                & Electrolytic \\ \hline
C4       & 1\,$\mu$F        & Capacitor     &                & Electrolytic \\ \hline
R1       & 100K\,$\Omega$   & Resistor      &                & 0.25\,W \\ \hline
X1       &                  & DB9           &                & For chasis \\ \hline
X5       &                  & Jumper comm   &                & 4 pins with clip for serial comm  \\ \hline

\end{tabular}
\end{center}

\subsection{Diagram of connections.}

\begin{center}
\scalebox{0.6}[0.48]{\includegraphics{Interface_RS232_circuit.png}}
\end{center}

\subsection{ Printed circuit and serial interface prototype built using a generic PCB.}

\begin{center}

\begin{tabular}{cc}
\rotatebox{90}{\includegraphics{Interface_RS232_Board.png}} &
\scalebox{0.775}{\includegraphics{Interfaz_serial_perspectiva_04.jpg}} \\
\end{tabular}

\end{center}

\subsection{RS232 serial interface and control program usage.}

The software is very easy to use. It is completely asynchronous and
independent of the order of connection and initilization.

\begin{center}
\textcolor{red}{\textbf{\Huge{WARNING!!!!!}}}
\end{center}

\begin{enumerate}
\item There should be no ejection charges connected to the altimeter.
  If such a charge is connected to the drogue, then premature ignition
  will be experienced, because the pin used for communications is the
  same used for ejection charge ignition.

\item First connect the interface to the altimeter, then turn on the
  altimeter. In this way it starts in communication mode, instead of
  fly mode.
\end{enumerate}

The correct sequence is the following:

\begin{enumerate}
\item Connect the altimeter to the serial interface.
\item Connect the serial interface to the PC.
\item Run the software.
\item Turn on the altimeter.
\item Read the altimeter parameters.
\item Modify the parameters.
\item Write back the parameters .
\item Exit configuration (the altimeter sends an acustic signal and enters normal
   (default) mode.
\item Turn off the altimeter.
\item Disconnect the interface.
\item Exit the program.
\item Connect the igniters and prepare the rocket for flight.
\end{enumerate}

The graphical user interface of the communications program for Windows is shown below

\begin{center}
  \scalebox{0.90}{\includegraphics{gui_pc.png}}
\end{center}

As you can appreciate, the interface is very simple and selfdocumenting.